<p id="notice"><%= notice %></p>

<p>
  <strong>Name:</strong>
  <%= @post.name %>
</p>

<p>
  <strong>Title:</strong>
  <%= @post.title %>
</p>

<p>
  <strong>Content:</strong>
  <%= @post.content %>
</p>

<h2>Comments</h2>
<% @post.comments.each do |comment| %>
  <p>
  	<b>Commenter:</b>
  	<%= comment.commenter %>
  </p>

  <p>
  	<b>Comment:</b>
  	<%= comment.body %>
  </p>

<% end %>

<h2> Add a comment:</h2>
<%= form_for([@post, @post.comments.build]) do |f| %>

  <div class="field">
    <%= f.label :commenter %><br>
    <%= f.text_field :commenter %>
  </div>
  <div class="field">
    <%= f.label :body %><br>
    <%= f.text_field :body %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>



<%= link_to 'Edit', edit_post_path(@post) %> |
<%= link_to 'Back', posts_path %>
